<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .tool-tit {
            width: 200px;
            height: 100px;
            background-color: pink;
            margin: 300px auto;
            text-align: center;
            line-height: 100px;
            position: relative;
        }

        /* 子绝父相 */
        .tip {
            position: absolute;
            top: -80px;
            right: 10px;
            height: 60px;
            line-height: 60px;
            width: 120px;
            background-color: #fff;
            /* 隐藏 */
            display: none;

            /* 圆角 */
            border-radius: 6px;
            /* 盒子阴影 x轴阴影 y轴阴影 模糊程度 距离 颜色*/
            box-shadow: 3px 4px 20px 0 #ddd;
        }

        .tool-tit:hover .tip {
            display: block;
        }

        span {
            display: inline-block;
            width: 0;
            height: 0;
            /* 边框三角 */
            border: 10px solid transparent;
            border-top: 10px solid #fff;
            /* 父元素是绝对定位，所以当前absolute会相对tip进行偏移 */
            position: absolute;
            bottom: -20px;
        }
    </style>
</head>

<body>
    <div class="tool-tit">
        鼠标滑过
        <div class="tip">提示工具
            <span></span>
        </div>
    </div>
</body>

</html>